package binary;

public class HexDemo {
    public static void main(String[] args) {
       int n = 0x2fd47b; //0x表示16进制
       int m = 0b10_1111_1101_0100_0111_1011; //0b表示2进制
        System.out.println(Integer.toBinaryString(n)); //按2进制输出
        System.out.println(Integer.toBinaryString(m));

        System.out.println(Integer.toHexString(n));//按16进制输出
        System.out.println(Integer.toHexString(m));
        System.out.println(n);//按10进制输出
        System.out.println(m);

        int a = 067;
        System.out.println(a); //55(6*8+7*1)

    }
}
